using System.Windows.Forms;

namespace DZTC.Base32Utility
{
    internal class Dialog
    {
        public static void Error(string title, string message)
        {
            MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static bool YesNo(string message)
        {
            return   MessageBox.Show(message, "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes;
        }

        public static void Error(string message)
        {
            Error("Error", message);
        }

        public static void PromtOutputFileNotSet()
        {
            Error("Error", "Output fileis not set");
        }

        public static void PromtOutputFileNameInvalid(string fileName)
        {
            Error("Error", "Output file name is invalid");
        }

        public static bool PromptOutputFileAlreadyExist()
        {
            return YesNo("Output file is already exist and will be overwritten. Are you sure?");
        }

        public static bool PromtOuptutFileDirectoryNotExist()
        {
            return YesNo("Output directory not exist and will be created. Are you sure?");
        }

        public static void PromptInputFileNotSet()
        {
            Error("Error", "Input file not set");
        }

        public static void PromptInputFileNotFound()
        {
            Error("Input file is not found");
        }
    }
}